package cool.qingqing.error;

import java.util.LinkedHashMap;
import java.util.Map;

import org.springframework.boot.web.servlet.error.DefaultErrorAttributes;
import org.springframework.web.context.request.WebRequest;

public class MyErrorAttributes extends DefaultErrorAttributes{
    


   @Override
	public Map<String, Object> getErrorAttributes(WebRequest webRequest, boolean includeStackTrace) {
		Map<String, Object> map = super.getErrorAttributes(webRequest, includeStackTrace);
        map.get("status");
        webRequest.setAttribute("ex", map, HIGHEST_PRECEDENCE);
        return map;
	
	}
}
